using UnityEngine;

[CreateAssetMenu(menuName = "Weapon Bullet Line")]
public class WeaponBulletLine : WeaponCartridge
{
	[Tooltip("Дистанция в пределах камеры")]
	public bool distCamera;

	public override void StartWeapon(WeaponHands weapon)
	{
		if (distCamera)
		{
			sourceBullets.distance = Camera.main.aspect * Camera.main.orthographicSize * 2f;
			sourceBullets.distance = Mathf.Floor(sourceBullets.distance * 100f) / 100f;
		}
	}

	public override void Shot(WeaponHands weapon, float distToAim)
	{
		ShotBullet(sourceBullets, weapon, distToAim);
	}
}
